package com.example.demo.strategy.patter;

/**
 * 使用策略模式
 */
public class ApplicationRunner {

    private Application itsApplication = null;

    public ApplicationRunner(Application app){
        itsApplication = app;
    }

    public void run(){
        itsApplication.init();
        while (!itsApplication.done()){
            itsApplication.idle();
        }
        itsApplication.cleanup();
    }
}
